package com.crm.service;

import java.util.List;

import com.crm.dao.BookDao;
import com.crm.pojo.Book;

public class BookService {

	private BookDao bookDao;

	public void setBookDao(BookDao bookDao) {
		this.bookDao = bookDao;
	}
	public void save(Book book){
		bookDao.save(book);
	}
	public void edit(Book book){
		bookDao.save(book);
	}
	public void del(int id){
		bookDao.del(id);
	}
	
	public List<Book> findAll(){
		return bookDao.findAll();
	}
	public Book findById(int id){
		return bookDao.findById(id);
	}
}
